package behavior.state;

public class StartState implements VehicleState{
    @Override
    public void inOut(Context context) {
    }

    @Override
    public void start(Context context) {
        System.out.println("车辆开始运营");
    }

    @Override
    public void stop(Context context) {
        context.setVehicleState(Context.STOP_STATE);
        context.getVehicleState().stop(context);
    }

    @Override
    public void charge(Context context) {
        context.setVehicleState(Context.CHARGE_STATE);
        context.getVehicleState().charge(context);
    }

    @Override
    public void repair(Context context) {
        context.setVehicleState(Context.REPAIR_STATE);
        context.getVehicleState().repair(context);
    }
}
